/*************************************************************************
	> File Name: Example5_8.java
	> Author: Potter
	> Mail: tobewhatwewant@gmail.com 
	> Created Time: 2014年07月07日 星期一 23时15分11秒
 ************************************************************************/

class Student {
    int number;
    String name;

    Student(int number, String name) {
        this.number = number;
        this.name = name;

        System.out.println("我的名字是:"+name+", 学号是:"+number);
    }
}

class UniverStudent extends Student {
    boolean isMarriaged;

    UniverStudent(int number, String name, boolean b) {
        super(number, name); // 使用spuer来调用父类的构造方法
                            // super必须是子类构造方法的头一条语句
                            // 如不显示调用，则默认调用super();
        isMarriaged = b;
        System.out.println("婚否? (" + isMarriaged + ")");
    }
}

public class Example5_8 {
    public static void main(String args[]) {
        UniverStudent zhang = new UniverStudent(9901, "何小玲", false);
    }
}
